#include<iostream>
#include<string>
using namespace std;
const int N = 3e3 + 10;
int a[N], b[N];
int n;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n;
		if (n & 1) {
			cout << "zs wins" << endl;
		}
		else {
			cout << "pb wins" << endl;
		}
	}
	return 0;
}